import { _decorator, Component, Node, Vec3 } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('autorotation')
export class autorotation extends Component {
    @property({type:Number}) speed = 1;
    start() {

    }

    update(deltaTime: number) {
        const y = this.node.eulerAngles.y + this.speed
        this.node.setRotationFromEuler(new Vec3(this.node.eulerAngles.x, y, this.node.eulerAngles.z))
    }
}


